function [res, timeElapsed, resAIO] = MKKMMR_single_dataset(Ks, Y, lambdas, nRepeat)
[nSmp, ~, nKernel] = size(Ks);
nCluster = length(unique(Y));
if ~exist('nRepeat', 'var')
    nRepeat = 1;
end


if ~exist('lambdas', 'var')
    lambdas = 2.^[-15:15];
end

tic;
resAIO = zeros(length(lambdas), 3);
for i2 = 1:length(lambdas)
    lambda = lambdas(i2);
    res_mkkmmr = [];
    for i1 = 1:nRepeat
        [label_mkkmmr, H, w, objHistory] = MKKMMR(Ks, nCluster, lambda);
        res_mkkmmr = [res_mkkmmr; ClusteringMeasure(Y, label_mkkmmr)];%#ok<AGROW>
    end
    resAIO(i2,:) = mean(res_mkkmmr, 1);
end
res = max(resAIO, [], 1);
timeElapsed = toc;